Median filtering is a well-known image processing tool which replaces one or many pixels of an image with a median value of a neighborhood of pixels. The median filter has been used for various functions including noise removal. A median filter uses a local neighborhood of pixels, usually a square of n.times.n pixels. The median value of the neighborhood is the pixel which has x number of pixels brighter than that pixel value and x number of pixels that are less bright than that pixel value. The same number of pixels are hence brighter and less bright than the median.
Median values have been used for certain effects in images. One particularly preferred use for median values is in correction of inoperative pixels in a pixel device, i.e., dead pixels.
Various complicated operations have been used to obtain the median value. One common way of obtaining the median value includes storing all the pixel values of the neighborhood into registers, and subsequently testing the register contents and determining which pixel value is the median among those values. This requires multiple comparisons which dictate the speed of the process.
Many median filtering operations have been digital operations. Median filtering of image hence often necessitated a separate analog to digital conversion step.
The present invention defines a digital median filter. The technique of the present invention simultaneously carries out analog to digital conversion while obtaining a digital median value bit by bit. The system of the present invention allows obtaining varying resolution as a tradeoff for a longer conversion time.
Another aspect of the present invention is a median filter which operates without analog circuit components such as a differential amplifier. Yet another object of the present invention is to describe a combined A/D converter and median filter which carries out both operations in a single step to improve the speed thereof. The operation according to the preferred embodiment is carried out by using a successive approximation A/D technique which is modified to produce an output value indicative of the median value. It is hence another object of the present invention to use a successive approximation type A/D converter in a special way to secure a digital output indicative of a median value.